<template>
  <el-dialog width="400px" :fullscreen="true" :visible.sync="visible" :modal="false" class="avue-dialog avue-dialog--top" custom-class="fielDialog" title="查看文件" @close="$emit('close', false)">
    <iframe :src="url" frameborder="0" />
  </el-dialog>
</template>

<script>
export default {
  props: {
    show: {
      type: Boolean,
      default: false
    },
    url: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      visible: false
    }
  },
  watch: {
    show: {
      handler(val) {
        this.visible = val
      },
      immediate: true
    }
  }
}
</script>

<style lang="scss" scoped>
iframe {
    width: 100%;
    min-height: 92vh;
}
</style>
